PELogOnServer
Use PELogOnServer to logon to the specified server.
C Syntax
BOOL CRPE_API PELogOnServer (
const char FAR *dllName,
PELogOnInfo FAR *logOnInfo );
Parameters
dllName
| Specifies a pointer to the name of the Crystal Reports DLL for the server or password protected non-SQL table to which you want to logon. (for example, "PDSODBC.DLL"). Note that the dllName must be enclosed in quotes. DLL names have the following naming convention: PDB*.DLL for standard (non-SQL) databases and PDS*.DLL for SQL/ODBC databases.
|
logOnInfo
| Specifies a pointer to PELogOnInfo.
|
Returns
- TRUE if the call is successful.
- FALSE if the call fails.
Remarks
- PELogOnServer and PELogOffServer, can be called at any time to log on and off a database server. These functions are not required if PESetNthTableLogOnInfo, was already used to set the password for a table.
- This function requires a database DLL name, which can be retrieved using PEGetNthTableType.
- This function can also be used for non-SQL tables, such as password-protected Paradox tables. Call this function to set the password for the Paradox DLL before beginning printing.
- When printing using PEStartPrintJob, the ServerName passed in PELogOnServer does not need to agree exactly with the server name stored in the report. PELogOnServer can be used to switch to a different server or datasource at runtime.
- The following points need to be considered when deciding whether to use PELogOnServer or PESetNthTableLogOnInfo.
- PELogOnServer is easier to call than PESetNthTableLogOnInfo, and it can be called at any time. However, you must know the database DLL name to make this call.
- PESetNthTableLogOnInfo is more flexible than PELogOnServer. It allows you to override any of the logon parameters. PESetNthTableLogOnInfo must be called after PEOpenPrintJob.
VB Syntax
Declare Function PELogOnServer Lib "crpe32.dll" ( ByVal DLLName As
String, LogOnInfo As PELogOnInfo ) As Integer
Delphi Syntax
function PELogOnServer(
dllName: PChar;
var logOnInfo: PELogOnInfo
): Bool stdcall;